import java.awt.*;
import java.util.Random;

public class WordThread extends Thread
{  
	int  time = 2000;
	char word;
    int k;
    Label com;
    String input = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
    WordThread(Label com)
    {  this.com=com;
    }    
    public void run()
    {
        Random random = new Random();
       k=random.nextInt(input.length());
       while(true)
        {
          word=input.charAt(k);
          com.setText(""+word);
          try{
        	  sleep(time);
             }
          catch(InterruptedException e){}
            k=random.nextInt(input.length());
        }
    } 
}
